<?php if (!defined('THINK_PATH')) exit();?><!doctype html>
<html>
<head>
    <meta charset="UTF-8">
    <title>后台管理</title>
    <link rel="stylesheet" type="text/css" href="/Public/Admin/css/common.css"/>    
    <link rel="stylesheet" type="text/css" href="/Public/Admin/css/main.css"/>    
    <!-- <link rel="stylesheet" type="text/css" href="/Public/Admin/css/Validform_v5.3.2_min.css"/>     -->
    <script type="text/javascript" src="/Public/static/jquery-2.1.4.min.js"></script>
    <script type="text/javascript" src="/Public/Admin/js/libs/modernizr.min.js"></script>
    <script type="text/javascript" src="/Public/Admin/js/jquery-1.9.1.min.js"></script>
    <script type="text/javascript" src="/Public/Admin/js/libs/modernizr.min.js"></script>
    <script src="/Public/Admin/js/validateForm.js" ></script>
    <script type="text/javascript" src="/Public/Admin/js/Validform_v5.3.2_min.js"></script>
    <script type="text/javascript" src="/Public/Admin/js/libs/alertAndConfirm.js"></script>
    <script type="text/javascript" src="/Public/Admin/js/jquery.uploadify.js"></script>
    <script type="text/javascript" src="/Public/Admin/js/jquery.uploadify.min.js"></script>
    <script type="text/javascript" charset="utf-8" src="/Public/ueditor/ueditor.config.js"></script>
    <script type="text/javascript" charset="utf-8" src="/Public/ueditor/ueditor.all.min.js"></script>
    <script>
   Validator.ExtraRight = "<img src=\"/Public/Admin/images/check_right.gif\">&nbsp;"; //!!!! 此变量必须重新指定，默认为空值，请把它改成当验证成功时你想要显示的图标 !!!!//
   Validator.ExtraError = "<img src=\"/Public/Admin/images/check_error.gif\">&nbsp;"; //!!!! 此变量必须重新指定，默认为空值，请把它改成当验证失败时你想要显示的图标 !!!!//

</script>
</head>
<style type="text/css">
.pages {

    margin: 20px 350px;
}
.pages a,.pages span {
    display:inline-block;
    padding:2px 5px;
    margin:0 1px;
    border:1px solid #f0f0f0;
    -webkit-border-radius:3px;
    -moz-border-radius:3px;
    border-radius:3px;
}
.pages a,.pages li {
    display:inline-block;
    list-style: none;
    text-decoration:none; color:#58A0D3;
}
.pages a.first,.pages a.prev,.pages a.next,.pages a.end{
    margin:0;
}
.pages a:hover{
    border-color:#50A8E6;
}
.pages span.current{
    background:#50A8E6;
    color:#FFF;
    font-weight:700;
    border-color:#50A8E6;
}
</style>
<body>

<div class="topbar-wrap white">
    <div class="topbar-inner clearfix">
        <div class="topbar-logo-wrap clearfix">
            <h1 class="topbar-logo none"><a href="index.html" class="navbar-brand">后台管理</a></h1>
            <ul class="navbar-list clearfix">
                <li><a class="on" href="/Admin">首页</a></li>
                <li><a href="http://hubao.ynten.com/" target="_blank">网站首页</a></li>
            </ul>
        </div>
        <div class="top-info-wrap">
            <ul class="top-info-list clearfix">
                <?php if($_SESSION['adminname']): ?><li style="color:red"> 欢迎你：Admin</li>
                <?php else: ?> <li> 管理员</li><?php endif; ?>
                <li><a href="/Admin/Login/editpwd">修改密码</a></li>
                <li><a href="/Admin/Login/profile">修改资料</a></li>
                <li><a href="/Admin/Login/logout">退出</a></li>
            </ul>
        </div>
    </div>
</div>
<div class="container clearfix">
    <div class="sidebar-wrap">
        <div class="sidebar-content">
            <ul class="sidebar-list">
                 <li>
                    <a href="#"><i class="icon-font">&#xe003;</i>系统设置</a>
                    <ul class="sub-menu">
                        <li><a href="<?php echo U('Other/index');?>"><i class="icon-font">&#xe008;</i>信息设置</a></li>
                        <li><a href="<?php echo U('Site/index');?>"><i class="icon-font">&#xe006;</i>网站设置</a></li>
						<li><a href="<?php echo U('Waiter/index');?>"><i class="icon-font">&#xe005;</i>客服设置</a></li>
                        <li><a href="<?php echo U('Site/flash');?>"><i class="icon-font">&#xe007;</i>幻灯管理</a></li>
                        <li><a href="<?php echo U('Url/index');?>"><i class="icon-font">&#xe009;</i>友情链接</a></li>
                        <li><a href="<?php echo U('Waiter/message');?>"><i class="icon-font">&#xe025;</i>短信邮箱账号</a></li>
                    </ul>
                </li>

			<li>
                    <a href="#"><i class="icon-font">&#xe035;</i>银行卡管理</a>
                    <ul class="sub-menu">
                        <li><a href="<?php echo U('Card/index');?>"><i class="icon-font">&#xe036;</i>银行卡列表</a></li>
                        <li><a href="<?php echo U('Card/insert');?>"><i class="icon-font">&#xe038;</i>银行卡添加</a></li>
                    </ul>
                </li>
		<!--  		<li>
                    <a href="#"><i class="icon-font">&#xe015;</i>财务审核</a>
                    <ul class="sub-menu">
                        <li><a href="/Admin/Gongshi/index"><i class="icon-font">&#xe034;</i>计划审核</a></li>
                        <li><a href="/Admin/Huo/index"><i class="icon-font">&#xe034;</i>活动审核</a></li>
                        <li><a href="/Admin/User/xian"><i class="icon-font">&#xe028;</i>提现订单</a></li>
                        <li><a href="#"><i class="icon-font">&#xe032;</i>财务总览</a></li>
                    </ul>
                </li>
                <li>
                    <a href="#"><i class="icon-font">&#xe018;</i>公文配置</a>
                    <ul class="sub-menu">
                        <li><a href="/Admin/Gong/updatelc"><i class="icon-font">&&#xe022;</i>互保流程</a></li>
                        <li><a href="/Admin/Gong/index"><i class="icon-font">&#xe021;</i>互保公约</a></li>
                    </ul>
                </li> -->
				<li>
                    <a href="#"><i class="icon-font">&#xe050;</i>用户</a>
                    <ul class="sub-menu">
					    <li><a href="/Admin/User/index"><i class="icon-font">&#xe008;</i>会员中心</a></li>
						<!-- <li><a href="/Admin/Admin"><i class="icon-font">&#xe005;</i>管理员</a></li> -->
                        <!-- <li><a href="system.html"><i class="icon-font">&#xe031;</i>信用中心</a></li> -->
                        <!-- <li><a href="/Admin/Userfan/index"><i class="icon-font">&#xe039;</i>用户反馈</a></li> -->
                    </ul>
                </li>
                 <li>
                    <a href="#"><i class="icon-font">&#xe050;</i>管理员</a>
                    <ul class="sub-menu">
                        <li><a href="/Admin/Rbac/index"><i class="icon-font">&#xe008;</i>管理员</a></li>
                        <li><a href="/Admin/Rbac/role"><i class="icon-font">&#xe005;</i>角色管理</a></li>
                        <li><a href="/Admin/Rbac/jurisdiction"><i class="icon-font">&#xe039;</i>节点管理</a></li>
                    </ul>
                </li>
                 <li>
                    <a href="#"><i class="icon-font">&#xe018;</i>数据库备份</a>
                    <ul class="sub-menu">
                        <li><a href="/Admin/Bak/index"><i class="icon-font">&&#xe022;</i>数据备份</a></li>
                       <!--  <li><a href="/Admin/Gong/index"><i class="icon-font">&#xe021;</i>互保公约</a></li> -->
                    </ul>
                </li>
            </ul>
        </div>
    </div>
    
    <!--/sidebar-->

  <div class="main-wrap">

    <div class="crumb-wrap">
      <div class="crumb-list"> <i class="icon-font"></i>
        <a href="/Admin/Index/index">首页</a>
        <span class="crumb-step">&gt;</span>
        <a class="crumb-name" href="/Admin/Rbac/role">角色分组列表</a>
        <span class="crumb-step">&gt;</span>
        <span>新增角色</span>
      </div>
    </div>
    <div class="result-wrap">
      <div class="result-content">
        <form action="/Admin/Rbac/addrole" method="post" id="login" name="login" onsubmit="return Validator.ValidateForm(this,3);">
          <input type='hidden' name='action' value='add' />
          <table class="insert-tab" width="100%">
            <tbody>
              <tr>
                <th width="120"> <i class="require-red">*</i>
                  角色中文名：
                </th>
                <td>
                  <input class="common-text input" type='text' id='remark' dataType="Custom"  name='name' size='30' regexp="^[\u4E00-\u9FA5]{1,10}$"  msg="（中文不能超过10个汉字)" onBlur="Validator.Validate(this)"/>
                  <span id='remarkWarning'>(中文角色名)</span>
                </td>
              </tr>
<!--               <tr>
                <th width="120">
                  <i class="require-red">*</i>
                  角色名：
                </th>
                <td>
                  <input class="common-text input" type='text' id='name' dataType="Custom"  name='name' size='30' regexp="^\w{4,15}$"  msg="（输入字母、数字或下划线（5-16位），必须以字母开头）" onBlur="Validator.Validate(this)"/>
                  <span id='nameWarning'></span>
                </td>
              </tr> -->
              <tr>
                <th width="120">
                  <i class="require-red">*</i>
                  父角色：
                </th>
                <td>
                  <select name='pid'>
                    <option value='0'>|-- 父角色</option>
                    <?php if(is_array($rlist)): $i = 0; $__LIST__ = $rlist;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><option value='<?php echo ($vo["id"]); ?>'>|--
                        <?php echo ($vo["name"]); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
                    </select>
                  </td>
                </tr>
                <tr>
                  <th width="120">
                    <i class="require-red">*</i>
                    状态：
                  </th>
                  <td>
                    <input type='radio' name='status' value='1' checked />
                    开启&nbsp;&nbsp;
                    <input type='radio' name='status' value='0' />
                    关闭
                  </td>
                </tr>
                <tr>
                  <th width="120">
                    <i class="require-red">*</i>
                    权限：
                  </th>
                  <td>
                    <style>
                #all li input{
                  margin:15px;
                }
                #all li{
                  font-family : KaiTi;
                  width:250px;
                  display:inline-block;
                  margin :2px;
                  box-shadow: 5px 5px 5px #888888;
                  border-radius:25px;
                  -moz-border-radius:25px; /* Old Firefox */
                }
                #all li.one{
                  border:1px solid red;
                  text-shadow: 5px 5px 5px #FFA68E;
                }
                #all li.two{
                  border:1px solid blue;
                  text-shadow: 5px 5px 5px #74B1FF;
                }
                #all li.three{
                  border:1px solid orange;
                  text-shadow: 5px 5px 5px #74af33;
                }
                
                
                    </style>
                    <ul id='all'>
                      <?php if(is_array($nlist)): $i = 0; $__LIST__ = $nlist;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><!-- 第一层 项目权限 -->
                        <li class='one'>
                          <input type='checkbox' name='node[]' value="<?php echo ($vo['id']); ?>"
                          <?php echo in_array($vo['id'],$Rone['node'])==true?"checked class='chkcss'":'';?>
                          />
                          <?php echo ($vo['title']); ?></li>

                          <hr />
                          <ul>
                            <?php if(is_array($vo["children"])): $i = 0; $__LIST__ = $vo["children"];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo2): $mod = ($i % 2 );++$i;?><li class='two'>
                                <input type='checkbox' name='node[]' value="<?php echo ($vo2['id']); ?>
                                "
                                <?php echo in_array($vo2['id'],$Rone['node'])==true?"checked class='chkcss'":'';?>
                                />
                                <?php echo ($vo2['title']); ?></li>
                                <ul class="right">
                                  <?php if(is_array($vo2["children"])): $i = 0; $__LIST__ = $vo2["children"];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo3): $mod = ($i % 2 );++$i;?><li class='three'>
                                      <input type='checkbox' name='node[]' value="<?php echo ($vo3['id']); ?>
                                      "
                                      <?php echo in_array($vo3['id'],$Rone['node'])==true?"checked class='chkcss'":'';?>
                                      />
                                      <?php echo ($vo3['title']); ?></li><?php endforeach; endif; else: echo "" ;endif; ?>
                                  </ul>
                                  <hr ><?php endforeach; endif; else: echo "" ;endif; ?>
                                <ul><?php endforeach; endif; else: echo "" ;endif; ?>
                              </ul>
                            </td>
                          </tr>
                          <tr>
                            <td></td>
                            <td>
                              <input class="btn btn-primary btn6 mr10" value="创建" type="submit">
                              <input class="btn btn6"  onclick="history.go(-1)" value="返回" type="button"></td>
                          </tr>
                        </tbody>
                      </table>
                      <script>
                      //点击 li 标签 就会触发点击时间0
                        $("#all li").mouseover(function(){
                              color = $(this).css("background-color"); 
                            $(this).css("background-color","#FFF500");
                        }).mouseout(function(){
                            $(this).css("background-color",color);
                        }).click(function(){
                            $(this).find("input").trigger("click").parent();
                          });
                    </script>
                    </form>
                  </div>
                </div>

              </div>
              <!--/main--> 
    <!--/main-->
    <script>
  $(function(){
    // $('ul.sub-menu').hide();
        $('ul.sidebar-list>li>a').click(function(){
            $(this).next().toggle();
        })
    })
    </script>
</div>
</body>
</html>